<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>问卷调查-结果</title>
  <link rel="stylesheet" href="/layui/css/layui.css">
  <link rel="stylesheet" href="/css/base.css">
</head>

<body>
  <div id="header">

    <ul class="layui-nav" lay-bar="disabled">
      <li class="layui-nav-item" lay-unselect="" style="color: #CFCEDC;font-size: 18px;">
        <i><img src="/img/navimg.png" alt=""></i>问卷调查系统
      </li>
    </ul>
  </div>


  <div class="relt-table">
    <div>统计结果：</div>

    <table id="table-1">
      <thead>
        <tr>
          <th>选项</th>
          <th>最高分</th>
          <th>最低分</th>
          <th>平均分</th>
          <th>总分</th>
        </tr>
      </thead>
      <tbody>
        {% for item in tj%}
        <tr>
          <td>{{item.title}}</td>
          <td>{{item.max}}</td>
          <td>{{item.min}}</td>
          <td>{{item.ave}}</td>
          <td>{{item.sum}}</td>

        </tr>
        {% endfor %}


      </tbody>
    </table>
  </div>


  <div id="wjtable">
    <div>详细结果：</div>
    <table id="table-1">
      <thead>
        <tr>
          <th>用户</th>
          {% for item in options%}
          <th>{{item}}</th>
          {% endfor %}
        </tr>
      </thead>
      <tbody>
        {% for item in list%}
        <tr>
          <td>{{item.user}}</td>
          {% for i in item.results%}
          <td>{{i}}</td>
          {% endfor %}
        </tr>
        {% endfor %}
      </tbody>
    </table>
  </div>
  <!-- <div id="paging-data">
    <div id="demo4"></div>
  </div> -->

  <script src="/js/jquery-3.6.0.min.js"></script>
  <script src="/layui/layui.js"></script>
  <script src="/js/base.js"></script>

  <script>
    layui.use(['laypage', 'layer'], function () {
      var laypage = layui.laypage
        , layer = layui.layer;
      //不显示首页尾页
      laypage.render({
        elem: 'demo4'
        , count: 11//数据条数
        , limit: 5//每页数据
        , first: false
        , last: false
      });

      console.log($('#paging-data'));
      $('#paging-data #demo4').on('click', function (el) {
        // if($(el.target).children())
        console.log('点击');
        console.log($(el.target).children('#layui-laypage-1'));
      })
    })

  </script>

</body>

</html>